
<?php 
$class1="";
$class2="";
$class3="";
$class4="";
switch ($this->router->fetch_class()) {
    case 'mod_user':
        $class4 = "active";
        break;
    case 'mod_upload':
        $class1 = "active";
        break;
    case 'mod_conversion':
        $class1 = "active";
        break;
    case 'mod_listtimecard':
        $class1 = "active";
        break;
    case 'mod_leaveregistration':
        $class2 = "active";
        break;
    case 'mod_overtime':
        $class2 = "active";
        break;
    case 'mod_employee':
        $class2 = "active";
        break;    
    case 'mod_holiday':
        $class3 = "active";
        break;
    case 'mod_leaveTypes':
        $class3 = "active";
        break;
    case 'mod_salarypara':
        $class3 = "active";
        break;
    case 'mod_pitpara':
        $class3 = "active";
        break;
    case 'mod_shiftinfo':
        $class3 = "active";
        break;
    case 'mod_salaryinfo':
        $class2 = "active";
        break;
    case 'mod_pitinfo':
        $class2 = "active";
        break;
    case 'mod_leaveinfo':
        $class2 = "active";
        break;
    case 'mod_pitrules':
        $class3 = "active";
        break;
}
?>
<div id="menu">
	<div id="nav_menu">
        <div id="logo_soft">
            <a href="<?php echo base_url();?>"><img src="<?php echo base_url();?>public/sites/images/payroll-outsource.png" width="40" /></a>
            <h2><a href="<?php echo base_url();?>"><?php echo $this->lang->line('h_titleapplication'); ?></a></h2>	
        </div>    
            <?php if($this->session->userdata('UserName')):?>
    	<ul class="menu">
            <li class="<?php echo $class1; ?>"><a href=""><?php echo $this->lang->line('h_Salarycaculation'); ?></a>
            	<ul class="sub-menu" >
                    <li><a href="<?php echo base_url();?>upload"><?php echo $this->lang->line('h_Uploadtimedata'); ?></a></li>
                    <li><a href="<?php echo base_url();?>listtimecard"><?php echo $this->lang->line('h_Calculatesalary'); ?></a></li>
                    <?php if($this->session->userdata('Level')==1):?>
                    <li><a href="<?php echo base_url();?>conversion"><?php echo $this->lang->line('h_Currencyconversionrate'); ?></a></li>
                    <?php endif; ?>
                </ul>
            </li>
            <li class="<?php echo $class2; ?>"><a href=""><?php echo $this->lang->line('h_Employeemanagement'); ?></a>
            	<ul class="sub-menu">
                    <li><a href="<?php echo base_url();?>leaveregistration"><?php echo $this->lang->line('h_Leaveregistration'); ?></a></li>
                    <li><a href="<?php echo base_url();?>overtime"><?php echo $this->lang->line('h_Overtimeregistration'); ?></a></li>
                    <?php if($this->session->userdata('Level')==1):?>
                    <li><a href="<?php echo base_url();?>employee"><?php echo $this->lang->line('h_Employeeinformation'); ?></a></li>
                    <?php endif; ?>
                </ul>
            </li>
            <?php if($this->session->userdata('Level')==1):?>
            <li class="<?php echo $class3; ?>"><a href=""><?php echo $this->lang->line('h_Masterdata'); ?></a>
            	<ul class="sub-menu" >
                    <li><a href="<?php echo base_url();?>holiday"><?php echo $this->lang->line('h_Holidayregistration'); ?></a></li>
                    <li><a href="<?php echo base_url();?>salary-parameter"><?php echo $this->lang->line('h_Salaryparameter'); ?></a></li>
                    <li><a href="<?php echo base_url();?>pit-parameter"><?php echo $this->lang->line('h_PITparameter'); ?></a></li>
                    <li><a href="<?php echo base_url();?>leave-types"><?php echo $this->lang->line('h_Leavetypes'); ?></a></li>
                    <li><a href="<?php echo base_url();?>shift-info"><?php echo $this->lang->line('h_Workingshift'); ?></a></li>                       
                </ul>                 
            </li>
            <li class="<?php echo $class4; ?>"><a href=""><?php echo $this->lang->line('h_Usermanagement'); ?></a>
                <ul class="sub-menu" >
                    <li><a href="<?php echo base_url();?>user"><?php echo $this->lang->line('User_info'); ?></a></li>
                </ul>
            </li>
            <?php endif; ?>
        </ul>
            <?php endif;?>
    </div>
</div>
